package cn.t.xsmart.lifecycledemo;

import android.arch.lifecycle.MutableLiveData;
import android.arch.lifecycle.ViewModel;

import java.util.List;

/**
 * Author: by HeJingzhou on 2018/6/20 15:24.
 * <p>
 * Company: 北京天创时代信息技术有限公司
 * <p>
 * Email: tcowork@163.com
 * <p>
 * Effect:
 */
public class UserModel extends ViewModel {

    private MutableLiveData<User> mutableLiveData;
    private MutableLiveData<List<User>> listMutableLiveData;

    public MutableLiveData<User> getCurrUser() {
        if (mutableLiveData == null) {
            mutableLiveData = new MutableLiveData<>();
        }
        return mutableLiveData;
    }

    public MutableLiveData<List<User>> getUserList() {
        if (listMutableLiveData == null) {
            listMutableLiveData = new MutableLiveData<>();
        }
        return listMutableLiveData;
    }
}
